const express = require('express');
const connection = require('../mysql') // 获取连接实例
const app = express();
const $sql = require('../db');

//获取所有通知
// var params = [req.body.account]
app.get('/getallmessage',(req,res) => {
	var sql = $sql.message.getallmessage
	connection.query(sql,(err,result) => {
		if (err) {
			console.log(err)
			return res.send(err);
		} else {
			return res.send(result);
		}
	})
})

module.exports = app;